package com.bidevalution.business.vo;

import com.bidevalution.dao.entity.ExpertWarnMsgVo;
import lombok.Data;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Data
public class CheckJobVo {
    private String msg;
    private Integer experTotal = 0; // 总专家数
    private Map<String, List<String>> details = new HashMap<>();
    private Map<String, String> failureMap = new HashMap<>();



    public void add(ExpertWarnMsgVo expertWarnMsgVo) {
        String expertName = expertWarnMsgVo.getExpertName();
        String expertId = expertWarnMsgVo.getExpertId();
        String enterpriseId = expertWarnMsgVo.getEnterpriseId();

        details(expertId, enterpriseId);
        failureMap.put(expertId, expertName);
    }

    private void details(String expertId, String enterpriseId) {
        List<String> list = details.get(expertId);
        if (list == null) {
            list = new ArrayList<>();
        }
        list.add(enterpriseId);

        details.put(expertId, list);
    }
}
